from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait

driver=webdriver.Firefox()
driver.get("http://localhost:8088/agileone")
print(driver.title)
assert driver.title == "AgileOne - Welcome to Login"
driver.implicitly_wait(10)#隐式等待
driver.find_element_by_id("username").send_keys("admin")
driver.find_element_by_class_name("login-password").send_keys("admin")
driver.find_element_by_id("login").click()
WebDriverWait(driver,10,0.5).until(lambda driver:driver.find_element_by_link_text("注销"))#显示等待


assert driver.find_element_by_partial_link_text("公告管理").is_displayed()==True
